﻿using System;
using System.Collections.Generic;
using System.Text;
using BaBaoFan.Modifier.Data;
using BaBaoFan.Modifier.Model;

namespace BaBaoFan.Modifier.Service
{
    public class PoolService : IPoolService
    {
        private IPoolRepository _poolRepository;
        public PoolService(IPoolRepository poolRepository)
        {
            _poolRepository = poolRepository;
        }
        public bool Add(PoolInfo poolInfo)
        {
            return _poolRepository.Add(poolInfo);
        }

        public bool Delete(int[] ids)
        {
            return _poolRepository.Delete(ids);
        }

        public PoolInfo GetPoolInfoById(int id)
        {
            return _poolRepository.GetPoolInfoById(id);
        }

        public IEnumerable<PoolInfoDto> GetPoolInfos()
        {
            return _poolRepository.GetPoolInfos();
        }

        public bool Update(PoolInfo poolInfo)
        {
            return _poolRepository.Update(poolInfo);
        }
        public IEnumerable<PoolArea> GetPoolAreas()
        {
            return _poolRepository.GetPoolAreas();
        }

        public bool AddPoolCoins(IEnumerable<PoolCoin> poolCoins)
        {
          return  _poolRepository.AddPoolCoins(poolCoins);
        }

        public bool AddPoolCoin(PoolCoin poolCoin)
        {
            return _poolRepository.AddPoolCoin(poolCoin);
        }
    }
}
